package com.tiantai.dashboard.service.impl;

import java.util.List;
import com.tiantai.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tiantai.dashboard.mapper.TeaMarkerMapper;
import com.tiantai.dashboard.domain.TeaMarker;
import com.tiantai.dashboard.service.ITeaMarkerService;

/**
 * 标记管理Service业务层处理
 * 
 * @author handsomedog
 * @date 2024-07-25
 */
@Service
public class TeaMarkerServiceImpl implements ITeaMarkerService 
{
    @Autowired
    private TeaMarkerMapper teaMarkerMapper;

    /**
     * 查询标记管理
     * 
     * @param id 标记管理主键
     * @return 标记管理
     */
    @Override
    public TeaMarker selectTeaMarkerById(Long id)
    {
        return teaMarkerMapper.selectTeaMarkerById(id);
    }

    /**
     * 查询标记管理列表
     * 
     * @param teaMarker 标记管理
     * @return 标记管理
     */
    @Override
    public List<TeaMarker> selectTeaMarkerList(TeaMarker teaMarker)
    {
        return teaMarkerMapper.selectTeaMarkerList(teaMarker);
    }

    /**
     * 新增标记管理
     * 
     * @param teaMarker 标记管理
     * @return 结果
     */
    @Override
    public int insertTeaMarker(TeaMarker teaMarker)
    {
        teaMarker.setCreateTime(DateUtils.getNowDate());
        return teaMarkerMapper.insertTeaMarker(teaMarker);
    }

    /**
     * 修改标记管理
     * 
     * @param teaMarker 标记管理
     * @return 结果
     */
    @Override
    public int updateTeaMarker(TeaMarker teaMarker)
    {
        teaMarker.setUpdateTime(DateUtils.getNowDate());
        return teaMarkerMapper.updateTeaMarker(teaMarker);
    }

    /**
     * 批量删除标记管理
     * 
     * @param ids 需要删除的标记管理主键
     * @return 结果
     */
    @Override
    public int deleteTeaMarkerByIds(Long[] ids)
    {
        return teaMarkerMapper.deleteTeaMarkerByIds(ids);
    }

    /**
     * 删除标记管理信息
     * 
     * @param id 标记管理主键
     * @return 结果
     */
    @Override
    public int deleteTeaMarkerById(Long id)
    {
        return teaMarkerMapper.deleteTeaMarkerById(id);
    }
}
